﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>课程详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <link href="https://cdn.bootcss.com/amazeui/2.7.2/css/amazeui.css" rel="stylesheet" />
    <link href="http://s.amazeui.org/assets/2.x/css/amaze.min.css?v=ivneioml" rel="stylesheet" />
    <link href="css/common.css" rel="stylesheet" />
    <style>
        body {
            background: #f4f5f9;
            font-family: 微软雅黑;
        }

        .head {
            width: 100%;
            overflow: hidden;
            position: relative;
            margin-bottom: 3%;
        }

        .bg {
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
            position: relative;
            max-height: 20rem;
            height: 20rem;
        }

        .info {
            display: block;
            margin-bottom: 1%;
            position: absolute;
            left: 5%;
            bottom: 5%;
            color: #fff;
        }

        .name-info {
            background: #fff;
            padding: 3% 5%;
            width: 100%;
            margin-bottom: 3%;
        }

        .name-info-main {
            color: #000;
            font-size: 1.6rem;
            margin-bottom: 3%;
            display: block;
        }

        .game_maind1 {
            background: #fff;
            display: flex;
            justify-content: space-between;
        }

        .main {
            width: 100%;
        }

        .main-course {
            width: 100%;
            background: #fff;
            overflow: hidden;
            padding: 0 0 3% 0;
            margin-bottom: 3%;
        }

        .main-course-head {
            border-left: 3px solid #54dea7;
            color: #54dea7;
            padding: 2%;
            display: block;
        }

        .main-course-info {
            padding: 3% 5%;
        }

        .main-course-info-title {
            color: #3a3a3a;
            text-align: center;
            width: 100%;
            display: block;
            font-size: 1.7rem;
            margin-bottom: 2%;
        }
        /*9a9a9a*/
        .main-course-info-body {
            color: #9a9a9a;
            display: block;
            font-size: 1.3rem;
        }

        .am-list-news-default .am-list .am-list-item-desced .am-list-item-text {
            margin-top: 0.2rem;
        }

        .am-list > li {
            border-top: none;
            margin-bottom: 0.1%;
        }

        .am-list-news-default {
            margin: 0;
        }

        .main-train {
            background: #fff;
            width: 100%;
            overflow: hidden;
            margin-bottom: 3%;
        }

        .main-train-info {
            padding: 2% 4%;
            width: 100%;
            overflow: hidden;
            padding-bottom: 0;
        }

        .main-comment {
            background: #fff;
            width: 100%;
            overflow: hidden;
            margin-bottom: 3%;
        }

        .main-comment-info {
            padding: 2% 4%;
            width: 100%;
            overflow: hidden;
            padding-bottom: 0;
        }

        .comment-info-details {
            width: 100%;
            border-bottom: 1px solid #cbcbcb;
        }

        .comment-details-top {
            overflow: hidden;
            width: 100%;
            padding: 2%;
            display: flex;
            align-items: center;
        }

        .comment-img {
            max-height: 50px;
            width: 20%;
            max-width: 50px;
            float: left;
        }

            .comment-img img {
                width: 100%;
                border-radius: 50%;
            }

        .comment-head {
            width: 80%;
            float: left;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 60px;
        }

        .comment-left {
            padding-left: 7%;
            overflow: hidden;
            width: 59%;
        }

            .comment-left span {
                display: block;
                color: #9a9a9a;
                font-size: 1.3rem;
                width: 100%;
            }

        .comment-right {
            color: #9a9a9a;
            font-size: 1.4rem;
        }

        .comment-details-bottom {
            overflow: hidden;
            width: 100%;
            padding: 2%;
            color: #9a9a9a;
            font-size: 1.4rem;
        }

        .fixed {
            position: fixed;
            bottom: 0;
            width: 100%;
            height: 8%;
            background: #fff;
        }

        .active_btn {
            width: 50%;
            background: #54dea7;
            color: #fff;
            text-align: center;
            float: left;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .price {
            width: 50%;
            height: 100%;
            float: left;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .am-nav-tabs {
            border: 1px solid #efefef;
            background: #fff;
        }

            .am-nav-tabs > li.am-active > a, .am-nav-tabs > li.am-active > a:hover, .am-nav-tabs > li.am-active > a:focus {
                border: none;
                border-bottom: 1px solid #6fddb1;
                color: #fff;
                font-weight: bold;
            }

            .am-nav-tabs > li > a {
                padding: 10% 0;
            }

        .scrollspy-nav a.am-active {
            color: #fff;
            font-weight: bold;
        }

        .coursedateimg span {
            display: flex;
            width: 40px;
            height: 40px;
            background: #c7c7c7;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
            color: #fff;
            font-size: 2.2rem;
        }

        .discount-info {
            background: #fff;
            overflow: hidden;
            width: 100%;
            padding: 3% 5%;
        }

        .dynamic {
            background: #fff;
            width: 100%;
            overflow: hidden;
            margin-bottom: 3%;
        }
        .mengceng{
    background: rgba(0,0,0,0.2);
    position: fixed;
    width: 100%;
    height:100%;
    top:0;
    display: none;
    z-index: 999999;
}
.signup{
    position: absolute;
    width: 100%;
    height:60%;
    background: #f4f5f9;
    bottom:0;
}
.clickhide{
    position: absolute;
    width: 100%;
    height:40%;
    top:0;
}
.courseplaninfo{
    width: 100%;
    padding: 0 3%;
    height:88%;
    overflow-y: auto;
}
.courseplanbody{
    padding:0 2%;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    margin-top: 3%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 21%;
}
.coursedateimg{
    overflow: hidden;

}
.coursedateimg span{
    display: flex;
    width: 40px;
    height: 40px;
    background: #c7c7c7;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 2.2rem;
}
.coursedateinfo{
    color: #c8c7c7;
    font-size: 1.4rem;
    margin-left: -20%;
}
.coursedateinfo_sp1{
    display: block;
    font-size: 1.5rem;
}
.coursedateinfo_sp2{
    display: block;
}
        .mengceng, .mengceng02 {
            background: rgba(0,0,0,0.2);
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            display: none;
            z-index: 999999;
        }

        .signup {
            position: absolute;
            width: 100%;
            height: 60%;
            background: #f4f5f9;
            bottom: 0;
        }

        .clickhide {
            position: absolute;
            width: 100%;
            height: 40%;
            top: 0;
        }

        .courseplaninfo {
            width: 100%;
            padding: 0 3%;
            height: 88%;
            overflow-y: auto;
            background: #fff;
        }

        .courseplanbody {
            padding: 0 2%;
            width: 100%;
            background: #fff;
            border-radius: 10px;
            margin-top: 3%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 21%;
        }

        .coursedateimg {
            overflow: hidden;
        }

            .coursedateimg span {
                display: flex;
                width: 40px;
                height: 40px;
                background: #c7c7c7;
                justify-content: center;
                align-items: center;
                border-radius: 50%;
                color: #fff;
                font-size: 2.2rem;
            }

        .coursedateinfo {
            color: #c8c7c7;
            font-size: 1.4rem;
            margin-left: -20%;
        }

        .coursedateinfo_sp1 {
            display: block;
            font-size: 1.5rem;
        }

        .coursedateinfo_sp2 {
            display: block;
        }

        .discount-info {
            background: #fff;
            overflow: hidden;
            width: 100%;
            padding: 3% 5%;
        }

        .discount_02 {
            padding: 2% 0;
        }

        .discount2_d1 {
            background-repeat: no-repeat;
            background-size: cover;
            width: 100%;
            padding: 1% 3%;
            background-color: #fff;
        }

        .discount2_sp1 {
            text-decoration: line-through;
            color: #a0a0a0;
            font-size: 1.4rem;
        }

        .discount2_sp2 {
            color: #000;
            font-size: 1.7rem;
        }

        .discount2_sp3 {
            display: block;
            text-align: left;
            font-size: 1.7rem;
            margin-bottom: 1%;
        }

        .discount2_sp4 {
            display: block;
            text-align: left;
            font-size: 1.3rem;
        }

        .discount2_d2 {
            float: right;
            margin-top: -12.5%;
        }


        .price_fixed {
            background: #3d3d3d;
            padding: 2%;
            position: fixed;
            bottom: 0;
            width: 100%;
        }

        .price_money01 {
            color: #fff;
            font-size: 2.4rem;
        }

        .price_money02 {
            color: #fff;
            font-size: 1.4rem;
        }

        .price_end {
            position: absolute;
            height: 100%;
            width: 30%;
            text-align: center;
            color: #fff;
            background: #23c788;
            top: 0;
            right: 0;
        }

        .kaciInfo {
            background: rgba(0,0,0,0.2);
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            display: none;
            z-index: 999999;
        }
        
        .signup2 {
            position: absolute;
            width: 100%;
            height: 60%;
            background: #f4f5f9;
            bottom: 0;
        }

        .clickhidekaci {
            position: absolute;
            width: 100%;
            height: 40%;
            top: 0;
        }
    </style>

</head>
<body>
    <div id="page" v-cloak>
        <div class="head">
            <header data-am-widget="header" class="am-header am-header-default" style="background-color:#fff;border-bottom: 1px solid #f2f2f2;">
                <div class="am-header-left am-header-nav" onclick="goBack()">
                    <a href="javascript:" class="">
                        <img class="am-header-icon-custom" src="images/veas07.png" alt="" />
                    </a>
                </div>
                <span style="width: 80%;display: block;text-align: center;margin: 0 auto;">详情</span>
                <div class="am-header-right am-header-nav" style="width: 49px;height: 49px;display: flex;justify-content: center;align-items: center">
                    <a href="" style="width: 100%;height: 100%;justify-content: center;align-items: center;display: flex;">
                        <span class="am-icon am-icon-phone"
                              style="display: flex;justify-content: center;
                  align-items: center;height: 35px;width: 35px;
                  color: #9f9f9f;border: 1px solid #ccc;border-radius: 50%"></span>
                    </a>
                </div>
            </header>
            <div class="bg" v-bind:style="{ backgroundImage:'url('+courseInfo.Img+')' }">
                <div style="position: absolute;width: 100%;height: 100%;background: rgba(0,0,0,0.3)"></div>
                <span class="info" style="font-size: 1.6rem;bottom: 18%;">飞羽体育</span>
                <span class="info" style="font-size: 1.3rem">报名：{{courseInfo.aStartTime}} 至 {{courseInfo.aEndTime}}</span>
            </div>

            <div class="name-info">
                <span class="name-info-main">{{courseInfo.Name}}</span>
                <div class="game_maind1">
                    <div><span class="name-info-main">金额：{{Trainsigninfo.Price}}元</span></div>
                    <div>
                        <span>
                            状态：{{torder.State==0?"未付费":"已付费"}}
                        </span>
                    </div>
                </div>
                <div class="game_maind1">
                    <div><img src="images/personticket01.png" alt="" style="width: 7%;float: left;display: block; margin-top: 4%;margin-right: 1%"><span style="color: #606060;font-size: 1.4rem">{{courseInfo.OrganizeName}}</span></div>
                    <div class="signupshow"><span class="am-badge am-radius" style="border: 1px solid #fc8b5d;color: #fc8b5d;background: inherit;font-weight: 100;border-radius: 5px;font-size: 1.5rem">课程安排</span></div>
                </div>
                <div class="game_maind1">
                    <div><span style="color: #606060;font-size: 1.4rem">剩余卡次:{{sykc}}</span></div>
                    <div class="xufei"><span class="am-badge am-radius" style="border: 1px solid #fc8b5d;color: #fc8b5d;background: inherit;font-weight: 100;border-radius: 5px;font-size: 1.5rem">续费</span>
                    </div>
                </div>
            </div>

            <div class="discount-info">
                <span style="font-size: 1.5rem"><span class="am-icon am-icon-credit-card" style="color: #54dea7;margin-right: 2%"></span>优惠信息</span>
                <div class="discount-info-cont discount-info1" v-if="torder.State==0  && torder.discountGId ==''" v-on:click="xuanze">
                    <span style="font-size: 1.6rem">优惠券</span>
                    <span style="float: right;color: #a5a5a5;">{{useDiscount==""?"暂无":"优惠" + dismoney + "元"}} <span class="am-icon am-icon-angle-right"></span></span>
                </div>
                <div class="discount-info-cont" v-else-if="torder.State==0  && torder.discountGId =='-1'">
                    <span style="font-size: 1.6rem">优惠券</span>
                    <span style="float: right;color: #a5a5a5;">暂无优惠 <span class="am-icon am-icon-angle-right"></span></span>
                </div>
                <div class="discount-info-cont" v-else-if="torder.State==0  && torder.discountGId !='-1'">
                    <span style="font-size: 1.6rem">优惠券</span>
                    <span style="float: right;color: #a5a5a5;">{{torder.Discount<=0?"未使用优惠":"已优惠" + torder.Discount + "元"}}<span class="am-icon am-icon-angle-right"></span></span>
                </div>
                <div class="discount-info-cont" v-else-if="torder.State==1">
                    <span style="font-size: 1.6rem">优惠券</span>
                    <span style="float: right;color: #a5a5a5;">{{torder.Discount<=0?"未使用优惠":"已优惠" + torder.Discount + "元"}} <span class="am-icon am-icon-angle-right"></span></span>
                </div>

            </div>
        </div>



        <div class="main" style="padding-bottom:54px;">
            <nav class="scrollspy-nav" data-am-scrollspynav="{offsetTop: 45}" data-am-sticky>
                <ul class="am-tabs-nav am-nav am-nav-tabs" style="background: #fff;font-size:0.8em;">
                    <li class="am-u-sm-3 main-li"><a href="#course" style="color: #8f8f8f;text-align: center;">课程简介</a></li>
                    <li class=" am-u-sm-3 main-li"><a href="#train" style="color: #8f8f8f;text-align: center;">教练简介</a></li>
                    <li class=" am-u-sm-3 main-li"><a href="#dynamic" style="color: #8f8f8f;text-align: center;">动态</a></li>
                    <li class=" am-u-sm-3 main-li"><a href="#comment" style="color: #8f8f8f;text-align: center;">评论</a></li>
                </ul>
            </nav>
            <div id="course" class="main-course">
                <span class="main-course-head">课程简介</span>
                <div class="main-course-info">
                    <span v-if="courseinfohidden==0" class="main-course-info-body" v-html="courseInfo.Info">
                    {{pinfo}}</span>
                    <span v-else class="main-course-info-body" v-html="courseInfo.Info">
                    </span>
                </div>
                <span v-on:click="clickMore()" style="display: block;text-align: center;color: #9a9a9a;font-size: 1.4rem;">展开全部 <span class="am-icon am-icon-angle-down"></span></span>
            </div>
            <div id="train" class="main-train">
                <span class="main-course-head">教练简介</span>
                <div class="main-train-info">
                    <div data-am-widget="list_news" style="margin-bottom: 0" class="am-list-news am-list-news-default am-no-layout">
                        <div class="am-list-news-bd">
                            <ul class="am-list" style="margin-bottom: 0">
                                <li style="border-top:none;max-height: 160px;position: relative;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                                    <div class="am-u-sm-3 am-list-thumb" style="max-height: 60px;overflow: hidden">
                                        <a href="">
                                            <img v-bind:src="coachInfo.faceImg" style="border-radius: 50%;width:75%;display: block;margin: 0 auto">
                                        </a>
                                    </div>
                                    <div class=" am-u-sm-9 am-list-main" style="max-height: 100px;position: relative;">
                                        <div class="am-list-item-hd" style="font-size: 1.5rem;margin-bottom:3%">
                                            {{coachInfo.Name}}
                                            <span class="am-badge am-radius" style="border: 1px solid #fc8b5d;color: #fc8b5d;background: inherit;font-weight: 100;border-radius: 5px;font-size: 1.3rem">主教练</span>
                                            <span class="am-icon am-icon-twitch" style="background: #54dea7;color: #fff;font-size: 1.3rem;padding:0 2%;border-radius: 5px"></span>
                                            <!--<span class="am-icon am-icon-phone" style="background: #ec7b8a;color: #fff;font-size: 1.3rem;padding:0 2%;border-radius: 5px">{{coachInfo.Phone}}</span>-->
                                        </div>
                                        <!-- <div class="am-list-item-text" style="color: #424242;">{{courseInfo.OrganizeName}}</div>-->
                                        <div class="am-list-item-text" style="color: #808080;margin-top:3%">{{coachInfo.Grade}}</div>
                                        <div class="am-list-item-text" style="color: #808080;margin-top:3%">{{coachInfo.profile}}</div>
                                    </div>
                                    <div style="height: 100%;width: 10%;display: flex;position: absolute;top: -0.1rem;right: 0;justify-content: center;align-items: center">
                                        <span class="am-icon am-icon-angle-right" style="color: #808080;font-size: 2.4rem"></span>
                                    </div>
                                </li>
                                <li v-for="coach2I in coach2Info" style="border-top:none;max-height: 160px;position: relative;" class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                                    <div class="am-u-sm-3 am-list-thumb" style="max-height: 60px;overflow: hidden">
                                        <a href="">
                                            <img v-bind:src="coach2I.coach.faceImg" style="border-radius: 50%;width:75%;display: block;margin: 0 auto">
                                        </a>
                                    </div>
                                    <div class=" am-u-sm-9 am-list-main" style="max-height: 100px;position: relative;">
                                        <div class="am-list-item-hd" style="font-size: 1.5rem;margin-bottom:3%">
                                            {{coach2I.coach.Name}}
                                            <span class="am-badge am-radius" style="border: 1px solid #458de1;color: #458de1;background: inherit;font-weight: 100;border-radius: 5px;font-size: 1.3rem"> 助理教练</span>
                                            <span class="am-icon am-icon-twitch" style="background: #54dea7;color: #fff;font-size: 1.3rem;padding:0 2%;border-radius: 5px"></span>
                                            <!--<span class="am-icon am-icon-phone" style="background: #ec7b8a;color: #fff;font-size: 1.3rem;padding:0 2%;border-radius: 5px">{{coach2I.coach.Phone}}</span>-->
                                        </div>
                                        <!--<div class="am-list-item-text" style="color: #424242;"></div>-->
                                        <div class="am-list-item-text" style="color: #808080;margin-top:3%">{{coach2I.coach.Grade}}</div>
                                        <div class="am-list-item-text" style="color: #808080;margin-top:3%">{{coach2I.coach.profile}}</div>
                                    </div>
                                    <div style="height: 100%;width: 10%;display: flex;position: absolute;top: -0.1rem;right: 0;justify-content: center;align-items: center">
                                        <span class="am-icon am-icon-angle-right" style="color: #808080;font-size: 2.4rem"></span>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div id="dynamic" class="dynamic">
                <span class="main-course-head">课程动态<span style="color: #b7b7b7;float:right;"><span class="am-icon am-icon-angle-right"></span></span></span>
                <div class="main-comment-info">
                    <div v-for="dynamic in dynamicInfo" class="comment-info-details">
                        <div class="comment-details-top">
                            <div class="comment-img">
                                <img v-bind:src="dynamic.headimg" alt="">
                            </div>
                            <div class="comment-head" style="width: 80%">
                                <div class="comment-left" style="    width: 70%;">
                                    <span style="color: #000;font-size: 1.6rem;display: inline-block;width:50%;float: left">{{dynamic.name}}</span>
                                    <span class="am-badge am-radius" style="width:50%;display: inline-block;border: 1px solid #fc8b5d;color: #fc8b5d;background: inherit;font-weight: 100;border-radius: 5px;font-size: 1.5rem">{{dynamic.coach}}</span>
                                </div>
                            </div>
                        </div>
                        <div class="comment-details-bottom">
                            <span>{{dynamic.cont}}</span>
                            <span style="font-size: 1.2rem;display: block;">{{dynamic.date}}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div id="comment" class="main-comment">
                <span class="main-course-head">评论 <span style="color: #b7b7b7;float:right;" v-on:click="clickpinglun()">所有评论 <span class="am-icon am-icon-angle-right"></span></span></span>
                <div class="main-comment-info">
                    <div v-for="comment in trainEvaluate" class="comment-info-details">
                        <div class="comment-details-top">
                            <div class="comment-img">
                                <img v-bind:src="comment.Userg.headImg" alt="">
                            </div>
                            <div class="comment-head">
                                <div class="comment-left">
                                    <span style="color: #000;font-size: 1.6rem">{{comment.Userg.Name}}</span>
                                    <span>{{comment.date}}</span>
                                </div>
                                <!--<div class="comment-right">
                                    <span class="am-icon am-icon-heart-o"></span>
                                </div>-->
                            </div>
                        </div>
                        <div class="comment-details-bottom">
                            <span>{{comment.Evaluate.Info}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="mengceng">
            <div class="clickhide">

            </div>
            <div class="signup">
                <div style="text-align: center;width: 100%;padding: 3%;border-bottom: 1px solid #efefef;height: 12%;background: #fff">
                    <span>课程表</span><span class="am-icon am-icon-close" style="font-weight: 100;float: right;font-size: 1.8rem;margin-top: -2%;color: #c8c7c7;"></span>
                </div>
                <div class="courseplaninfo">
                    <div v-for="trainInfo in trainInfo3List" class="courseplanbody">
                        <div class="coursedateimg">
                            <span class="am-icon am-icon-calendar-minus-o"></span>
                        </div>
                        <div class="coursedateinfo">
                            <span class="coursedateinfo_sp1">{{trainInfo.date}}</span>
                            <span class="coursedateinfo_sp2"><span class="am-icon am-icon-clock-o" style="margin-right: 5%"></span>{{trainInfo.actvitytime}}</span>
                        </div>
                        <div class="">
                            <button class="am-btn am-radius" style="color: #fff;font-size: 1.3rem;">{{trainInfo.state}}</button>
                        </div>
                    </div>
                    <div v-for="(trainInfo,index) in trainInfoList" class="courseplanbody">
                        <div class="coursedateimg">
                            <span class="am-icon am-icon-calendar-minus-o" style="background: #54dea7"></span>
                        </div>
                        <div class="coursedateinfo">
                            <span class="coursedateinfo_sp1">{{trainInfo.date}}</span>
                            <span class="coursedateinfo_sp2"><span class="am-icon am-icon-clock-o" style="margin-right: 5%"></span>{{trainInfo.actvitytime}}</span>
                        </div>
                        <div class="">
                            <button class="am-btn am-radius" v-on:click="chickBM(index)" style="color: #fff;font-size: 1.3rem;background: #54dea7;">{{trainInfo.state}}</button>
                        </div>
                    </div>
                    <div v-for="trainInfo in trainInfo2List" class="courseplanbody">
                        <div class="coursedateimg">
                            <span class="am-icon am-icon-calendar-minus-o"></span>
                        </div>
                        <div class="coursedateinfo">
                            <span class="coursedateinfo_sp1">{{trainInfo.date}}</span>
                            <span class="coursedateinfo_sp2"><span class="am-icon am-icon-clock-o" style="margin-right: 5%"></span>{{trainInfo.actvitytime}}</span>
                        </div>
                        <div class="">
                            <button class="am-btn am-radius" style="color: #fff;font-size: 1.3rem;">{{trainInfo.state}}</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="mengceng02">
            <div class="clickhide">
            </div>
            <div class="signup">
                <div style="text-align: center;width: 100%;padding: 3%;border-bottom: 1px solid #efefef;height: 12%;background: #fff">
                    <span>选择优惠</span><span class="am-icon am-icon-close closewindows" style="font-weight: 100;float: right;font-size: 1.8rem;margin-top: -2%;color: #c8c7c7;" v-on:click="closewindows()"></span>
                </div>
                <div class="courseplaninfo">


                    <div class="discount_02" v-on:click="useCard('',-1,'')">
                        <div class="discount2_d1" style="background-image: url(images/discount_03.png) ;">
                            <span class="discount2_sp3">不使用优惠</span>
                            <span class="discount2_sp4">本次不使用</span></span>
                            <div class="discount2_d2">
                                <span class="discount2_sp1">￥{{yuanmoney}}</span>
                                <span class="discount2_sp2">￥{{yuanmoney}}</span>
                                <img v-bind:src="''==useDiscount? 'images/discount_02.png': 'images/discount_01.png'" alt="" style="    width: 20%;">
                            </div>
                        </div>
                    </div>

                    <div class="discount_02" v-on:click="useCard(list.o.gId,list.o.discountType,list.o.PxValue)" v-for="(list,index) in discount">
                        <div class="discount2_d1" style="background-image: url(images/discount_03.png) ;">
                            <span class="discount2_sp3">{{list.o.Name}}</span>
                            <span class="discount2_sp4">可享{{list.o.PxType==1?list.o.PxValue + "元":list.o.PxValue +"%"}}优惠，每月可用{{list.o.Pxnumber}}次<span style="color: #f6a279;">（剩余{{list.o.Pxnumber-list.count}}次）</span></span>
                            <div class="discount2_d2">
                                <span class="discount2_sp1">￥{{yuanmoney}}</span>
                                <span class="discount2_sp2">￥{{list.dismoney}}</span>
                                <img v-bind:src="list.o.gId==useDiscount? 'images/discount_02.png': 'images/discount_01.png'" alt="" style="    width: 20%;">
                            </div>
                        </div>
                    </div>


                </div>
            </div>
        </div>

        <div class="price_fixed" v-if="torder.State==0">
            <span class="price_money01">￥{{money}}  | </span>
            <span class="price_money02">已优惠￥{{dismoney}}</span>
            <button class="am-btn price_end" v-on:click="useDiscountpay()">确认支付</button>
        </div>

        <div class="kaciInfo">
            <div class="clickhidekaci">
            </div>
            <div class="signup2">
                <div style="text-align: center;width: 100%;padding: 3%;border-bottom: 1px solid #efefef;height: 12%;background: #fff">
                    <span>选择次卡</span><span class="am-icon am-icon-close2" style="font-weight: 100;float: right;font-size: 1.8rem;margin-top: -2%;color: #c8c7c7;"></span>
                </div>
                <div class="courseplaninfo">
                    <div v-for="kaciInfo in kaci" class="courseplanbody" v-on:click="chickkaci(kaciInfo)">
                        <div class="coursedateimg">
                            <span class="am-icon am-icon-calendar-minus-o" style="background: #54dea7"></span>
                        </div>
                        <div class="coursedateinfo">
                            <span class="coursedateinfo_sp1">{{kaciInfo.split(",")[0]}}次卡, 金额: {{kaciInfo.split(",")[1]}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</body>
</html>

<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script>
<script src="js/common.js"></script>
<script src="https://cdn.bootcss.com/vue/2.5.9/vue.js"></script>
<script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>
<script>
    var page = new Vue({
        el: "#page",
        venueid: "",
        data: {
            tel: 'tel:6846463',
            courseinfohidden: 0,
            courseInfo: {},
            coachInfo: {},
            coach2Info: [],
            trainEvaluate: [],
            trainInfo2List: [],
            trainInfo3List:[],
            trainInfoList: [],
            dynamicInfo: [],
            Trainsigninfo:[],
            torder: {},//T_ORDER数据
            isshow: false,//是否显示优惠券/卡弹框
            discount: [],//优惠券/卡数组
            useDiscount: "",//使用的优惠券/卡Gid
            money: 0,
            dismoney: 0,
            distype: 0,
            yuanmoney: 0,
            pinfo: '',
            sykc: 0,
            kaci: [],
            Price: 0,
        },
        methods: {
            clickMore: function () {
                this.courseinfohidden = !this.courseinfohidden
            },
            getInfo: function () {
                var that = this;
                $.ajax({
                    type: 'POST',
                    url: window.apiUrl + '/Api/Field/TrainCardUserDetails',
                    data: { "gId": that.venueid },
                    success: function (data) {
                        console.log(data.data);
                        if (data.errcode == 0) {
                            that.courseInfo = data.data.venueInfo;
                            that.pinfo = data.data.pinfo;
                            that.coachInfo = data.data.coachInfo.coach;
                            that.coach2Info = data.data.coach2Info;
                            that.trainInfoList = data.data.trainInfoList;
                            that.trainInfo2List = data.data.trainInfo2List;
                            that.trainInfo3List = data.data.trainInfo3List;                            
                            that.trainEvaluate = data.data.trainEvaluate;
                            that.dynamicInfo = data.data.trainDynamic;
                            that.torder = data.data.order;
                            that.Trainsigninfo = data.data.Trainsigninfo;
                            console.log(data.data.order)
                            that.money = data.data.order.Money;
                            that.yuanmoney = data.data.order.Money;
                            that.sykc = data.data.sykc;
                            that.kaci = data.data.kaci;
                            if (that.torder.State == 0 && that.torder.discountGId != '') {
                                that.money = that.money - that.torder.Discount;
                                that.dismoney = that.torder.Discount;                                
                            }
                            tel = 'tel:' + that.courseInfo.OrganizePhone; 
                            if (that.courseInfo.state == 0)
                            { $('.fixed').show(); }
                            if (that.torder.State == 0)
                            {
                                $('.xufei').hide();                          
                            }
                            else { $('.fixed').hide(); }                            
                            if (data.data.jinxingzhong = "0" && that.trainInfoList.length > 0) {
                                if (that.trainInfoList[0].state == "未开始") {
                                    that.trainInfoList[0].state = "报名";
                                }
                            }
                            that.Price = 0;
                        }
                        else
                        {
                            alert(data.errmsg);
                        }
                    }
                });
            },
            useCard: function (discountGId, disType, disvalue) {
                var that = this;
                that.useDiscount = discountGId;
                if (disType == 1) {
                    that.distype = 1;
                    that.money = Math.round((that.torder.Money - disvalue) * 100) / 100;//that.orderinfo.payMoney - disvalue;
                    that.dismoney = disvalue;
                }
                else if (disType == 2) {
                    that.distype = 2;
                    that.money = Math.round((that.torder.Money - that.torder.Money * disvalue / 100) * 100) / 100;// that.orderinfo.payMoney - that.orderinfo.payMoney * disvalue / 100;
                    that.dismoney = Math.round((that.torder.Money * disvalue / 100) * 100) / 100;// that.orderinfo.payMoney * disvalue / 100;
                }
                else if (disType == -1) {
                    that.distype = -1;
                    that.money = that.torder.Money;
                    that.dismoney = 0;
                }
                $('.closewindows').click();
            },
            xuanze: function () {
                var that = this;
                //that.money = that.torder.Money;
                //alert(that.Trainsigninfo.gId);
                //return false
                $.ajax({
                    type: 'POST',
                    url: apiUrl + '/Api/Mine/GetCard',
                    data: { "venueId": that.courseInfo.OrganizegId, "orderid": that.Trainsigninfo.gId, type: 3 },
                    success: function (data) {
                        if (data.errcode == 0) {
                            that.discount = data.data;
                            console.log(that.discount);
                        } else if (data.errcode == -1) {
                            //alert(data.errmsg);
                        } else {
                            alert(data.errmsg);
                        }
                    },
                    //error: function () {
                    //    alert("服务器加载异常");
                    //}
                })
                this.isshow = true;
                $('.mengceng02').show();
            },
            closewindows: function () {
                this.isshow = false;
            },
            useDiscountpay: function () {
                var that = this;
                $.ajax({
                    url: apiUrl + "/Api/Field/createDisAllOrder",
                    data: { "Id": that.Trainsigninfo.gId, "useDiscountGid": that.useDiscount, type: 3 },
                    type: "POST",
                    success: function (data) {
                        if (data.errcode == 0) {
                            $.wxpay({
                                Id: data.data.Id,
                                type: data.data.type,
                                success: function (res) {
                                    if (res.errcode == 0) {
                                        alert("支付成功");
                                        location.replace(location.href);
                                    }
                                    else {
                                        alert(res.errmsg);
                                    }
                                },
                                error: function (res) {
                                    alert(res.errmsg);
                                }
                            })

                        } else {
                            alert(data.errmsg);
                        }

                    },
                })

            },
            chickBM: function (index) {
                $('.mengceng').hide();
                if (this.trainInfoList[index].state == "报名") {
                    //if (confirm("确认报名将扣除卡次，且不可退货。")) {
                        console.log(1);
                        $.ajax({
                            url: apiUrl + "/Api/Field/CardTrainsignInfo",
                            data: { "TrainInfogId": this.trainInfoList[index].o.gId },
                            type: "POST",
                            success: function (data) {
                                alert(data.errmsg);
                                if (data.errcode == 0) {
                                    this.sykc = this.sykc - 1;
                                    this.trainInfoList[index].state = "已报名";
                                }
                            }
                        });
                    //}
                }
                else if (this.trainInfoList[index].state == "已报名") {
                    alert("已报名");
                }
                else { alert(this.trainInfoList[index].state); }
            },
            chickkaci: function (kaciInfo) {
                //this.Price = kaciInfo.split(",")[1];
                var that = this;
                $('.kaciInfo').hide();
                $.ajax({
                    url: apiUrl + "/Api/Field/TrainCardxufei",
                    data: { "gId": that.courseInfo.gId, "clickkaci": kaciInfo },
                    type: "POST",
                    success: function (data) {
                        if (data.errcode == 0) {
                            alert(data.errmsg);
                            location.replace("TrainCardUserDetails.html?gId=" + data.data.gId);
                        } else {
                            alert(data.errmsg);
                        }

                    }
                });
            },
            clickpinglun: function () {
                location.replace("TrainEvaluatelist.html?gId=" + this.courseInfo.gId);
            },
        }
    })
    $(function () {
        var actid = $.getParam("gId");
        page.venueid = actid;
        //console.log(112);
        page.getInfo();      
    })

    //点击显示报名
    $('.signupshow').click(function () {
        $('.mengceng').show();
        console.log(112)
    });
    //$('.discount-info1').click(function () {
    //    $('.mengceng02').show();
    //});
    //点击关闭报名
    $('.am-icon-close').click(function () {
        $('.mengceng').hide();
        $('.mengceng02').hide();
    });
    //点击关闭报名
    $('.clickhide').click(function () {
        $('.mengceng').hide();
        $('.mengceng02').hide();
    });
    ////点击报名
    //$('.active_btn').click(function () {
    //    $.ajax({
    //        url: apiUrl + "/Api/Field/AddTrainsign",
    //        data: { "gId": page.venueid },
    //        type: "POST",
    //        success: function (data) {
    //            if (data.errcode == 0) {
    //                alert(data.errmsg);
    //                location.replace("confirmorder.html?gId=" + data.data.gId);
    //            } else {
    //                alert(data.errmsg);
    //            }

    //        }
    //    });
    //});
    //点击报名
    $('.xufei').click(function () {
        $('.kaciInfo').show();
        //if (page.Price == 0) {
            
        //}
        //else {
        //    $.ajax({
        //        url: apiUrl + "/Api/Field/AddTrainCardsign",
        //        data: { "gId": page.venueid, "clickkaci": page.clickkaci },
        //        type: "POST",
        //        success: function (data) {
        //            if (data.errcode == 0) {
        //                alert(data.errmsg);
        //                location.replace("TrainCardUserDetails.html?gId=" + data.data.gId);
        //            } else {
        //                alert(data.errmsg);
        //            }

        //        }
        //    });            
        //}
    });
    //点击关闭课表
    $('.am-icon-close2').click(function () {
        alert(1);
        $('.kaciInfo').hide();
    });
    //点击关闭课表报名
    $('.clickhidekaci').click(function () {
        $('.kaciInfo').hide();
    });
    
</script>
